import * as THREE from "three";
import { randomRange } from "./randomRange";
import { Triangle } from "./Triangle";

export const makeTriangle = (
  material: THREE.Material,
  lineMaterial: THREE.Material,
  t: any
) => {
  const triangle = new Triangle(
    2,
    new THREE.Vector3(0, 0, 0),
    Math.random() * 360,
    randomRange(5, 1),
    randomRange(0.1, 0.05),
    material,
    lineMaterial,
    {
      startShow: 15,
      endShow: 30,
      startHide: 60,
      endHide: 70,
    },
    t
  );
  return triangle;
};
